/*
 * gameDeviceCallback.h
 *
 *  Created on: 24.02.2012
 *      Author: Caffeine
 */

#ifndef GAMEDEVICECALLBACK_H_
#define GAMEDEVICECALLBACK_H_
#include <irrlicht.h>

class CGameDevice;

class IGameObject:public virtual irr::IReferenceCounted {
private:
	CGameDevice*parent;
protected:
	irr::IrrlichtDevice*device;
	irr::scene::ISceneManager*smgr;
#ifdef __GAME__
	irr::video::IVideoDriver* driver;
	irr::gui::IGUIEnvironment* guienv;
#endif
	irr::core::stringc pathToResurce;
public:
	IGameObject(CGameDevice*p);
	CGameDevice*getParent();
	virtual ~IGameObject();
	virtual void onRender()=0;
	virtual bool onMouseEvent(const irr::SEvent& event)=0;
	virtual bool onKeyEvent(const irr::SEvent& event)=0;
	virtual bool onLogEvent(irr::core::stringc text,irr::ELOG_LEVEL level)=0;
	virtual bool onGUIEvent(const irr::SEvent& event)=0;
	virtual bool onJoystickEvent(const irr::SEvent& event)=0;
	virtual void destroy();

	irr::core::stringc getPathToResurce();
	virtual void init();
};

#endif /* GAMEDEVICECALLBACK_H_ */
